cod_random_upgrade

Syntax

native cod_random_upgrade(&value, upgradeMin = -1, upgradeMax = 1, valueMin = NONE, valueMax = NONE);

Usage

value
Item value pointer to malipulate
upgradeMin
Minimum upgrade value, can be smaller than 0
upgradeMax
Maximum upgrade value
valueMin
Minimum item value
valueMax
Maximum item value

Description

Makes random item upgrade.

Note

After upgrade item value will always be at least 0.

Note

COD_STOP will be returned if item is not upgradable
or valueMin / valueMax is already reached.

Returns

COD_CONTINUE (0) if upgraded, otherwise COD_STOP (4)